package com.polukeuro.app.utils;

import java.util.Map;

import com.google.gwt.core.client.GWT;
import com.polukeuro.app.utils.StringUtils;

/**
 * Constant class utils
 * 
 * @author sebastien.ledu@gmail.com
 */
public final class ServerPathsUtils {
	
	public static final String HOST_NAME = GWT.getHostPageBaseURL();
	
	public static final String WEBAPP_URI = HOST_NAME+ "poluk-webapp/";
	
	public static final String WEBAPP_PERSIST_URI = WEBAPP_URI+ "persist/";
	
	public static final String GROUPS_JSON_URI = WEBAPP_URI + "getGroups.json";
	
	public static final String GROUP_ID_JSON_URI = WEBAPP_URI + "getGroup/{id}.json";
	
	public static final String PRONOSTIC_ID_JSON_URI = WEBAPP_URI + "pronostic/{id}.json";
	
	public static String substitute(String template, Map<String, String> data) {
		return StringUtils.substitute(template, data);
	}
	
}
